<!doctype html>
<html>

<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
    <title>{:htmlspecialchars($config.title)}</title>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <script type="text/javascript" src="{:sysconf('cdn_url')}/vote/index/jquery-2.1.3.min.js"></script>
    <script src="{:sysconf('cdn_url')}/vote/list/layui/layui.js"></script>
    <link href="{:sysconf('cdn_url')}/vote/list/layui/css/layui.css" rel="stylesheet" type="text/css">

</head>

<body style="background-color:#f4f5f5;" {if $config.kp_status}onload="startCountdown()"{/if}>

{if $config.kp_status}
<style>
    .splash-screen {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('{$config.kp_pic}');
        background-size: cover; /* 满屏显示背景图 */
        background-position: center center; /* 图像居中 */
        z-index: 9999;
    }
    .top-right-container {
        position: absolute;
        top: 20px;
        right: 20px;
        display: flex;
        align-items: center;
        background-color: rgba(255, 255, 255, 0.7);
        padding: 6px;
        border-radius: 5px;
    }

    .countdown {
        font-size: 16px;
        margin-right: 10px;
    }
    .countdown {
        color: white; /* 设置倒计时字体颜色为白色 */
    }
    .splash-screen .skip-button {
        color: white;
        font-size: 16px;
        cursor: pointer;
    }
</style>
<div class="splash-screen">
    <div class="top-right-container">
        <div class="countdown">5s</div> <!-- 在倒计时后添加“s” -->
        <div class="skip-button" onclick="skipSplash()" style="display: none;">跳过</div>
    </div>
</div>

<script>
    var countdown = 5;
    var countdownElement = document.querySelector('.countdown');
    var skipButton = document.querySelector('.skip-button');
    var splashScreen = document.querySelector('.splash-screen');

    function startCountdown() {

        if(getCookie("adv")){
            splashScreen.style.display = 'none';
            return
        }
        setTimeout(function() {
            skipButton.style.display = 'block'; // 显示“跳过”按钮
        }, 1000); // 1秒后显示“跳过”按钮

        countdown--;
        countdownElement.textContent = countdown + 's'; // 在倒计时数字后添加“s”

        if (countdown > 0) {
            setTimeout(startCountdown, 1000);
        } else {
            hideSplashScreen();
        }
    }

    function hideSplashScreen() {
        setCookie("adv", true, 600);
        splashScreen.style.display = 'none';
    }

    function skipSplash() {
        hideSplashScreen();
    }
    //获取cookie，参数name指定要获取的cookie的名称
    function getCookie(name) {
        var start = document.cookie.indexOf(name + "="); //得到cookie字符串中的名称
        var len = start + name.length + 1; //得到从起始位置到结束cookie位置的长度
        //如果起始没有值且name不存在于cookie字符串中，则返回null
        if ((!start) && (name != document.cookie.substring(0, name.length))) {
            return null;
        }
        if (start == -1) return null; //如果起始位置为-1也为null
        var end = document.cookie.indexOf(';', len); //获取cookie尾部位置
        if (end == -1) end = document.cookie.length; //计算cookie尾部长度
        return unescape(document.cookie.substring(len, end)); //获取cookie值
    }
    //设置cookie，name为名称，value为值，expires为过期日，path为路径，domain为域名，secure为加密
    function setCookie(name, value, expires, path, domain, secure) {
        var today = new Date();
        today.setTime(today.getTime());
        if (expires) {
//            expires = expires * 1000 * 60 * 60 * 24; //计算cookie的过期毫秒数
            expires = expires * 1000; //计算cookie的过期毫秒数
        }
        //计算cookie的过期日期
        var expires_date = new Date(today.getTime() + (expires));
        //构造并保存cookie字符串
        document.cookie = name + '=' + escape(value) +
            ((expires) ? ';expires=' + expires_date.toGMTString() : '') + //expires.toGMTString()
            ((path) ? ';path=' + path : '') +
            ((domain) ? ';domain=' + domain : '') +
            ((secure) ? ';secure' : '');
    }
</script>
{/if}

<style>
    .slider {
        display: none;
    }

    .focus span {
        width: 5px;
        height: 5px;
        margin-left: 5px;
        border-radius: 50%;
        background: #CDCDCD;
        font-size: 0
    }

    .focus span.current {
        background: red;
    }

    .m_head {
        width: 100%;
    }

    .m_head img {
        width: 100%;
        display: block;
    }
</style>

<header>
    <div class="m_head clearfix">
        <!--{if count($banner)<2}-->
        <!--{if isset($banner[0]['pic'])}-->
        <img style="width: 100%" src="{$banner[0]['pic']}" alt="">
        <!--{/if}-->
        <!--{else}-->
        <div class="slider">
            <ul>
                <!--{if !empty($banner)}-->
                {foreach $banner as $one}
                <li><a href="#"><img src="{$one.pic}"/></a></li>
                {/foreach}
                <!--{/if}-->
            </ul>
        </div>
        <!--{/if}-->
    </div>
</header>




<div class="wp-title_content "
     style="margin-top:10px;margin-left:10px;font-weight:bold;overflow-wrap: break-word; padding: 0px; border-color: transparent; border-width: 0px; height: 24px; width: 271px;">
    <p><span style="font-size: 13px;">{$config.notice}</span></p></div>

<div class="boxbg">


    <!--<style>
        .wp-title_content {
            font: 16px Helvetica,Arial,"Microsoft YaHei","黑体",Tahoma,sans-serif;
            color: #5a5a5a;
            margin: 0;
            overflow: hidden;
        }
        .btn-group {
            display: flex;
            justify-content: space-around;
            margin-bottom: 10px;
        }
        .btn {border: none;width: 180px; height: 80px; line-height: 80px; text-align: center; background-color: rgba(106,168,79,1);color: white; margin-bottom: 20px; border-radius: 10px; }
        .btn:hover {
            background-color: #ddd;
        }
    </style>

    <div class="btn-group">
        <a href="/index/ticket/zhinan" class="btn" style="background-color: rgba(74,134,232,1);">活动指南</a>
        <a href="/index/ticket/video" class="btn" style="background-color: rgba((106,168,79,1);">视频合集</a>
    </div>
    <div class="btn-group">
        <a href="/index/ticket/menpiao" class="btn" style="background-color: rgba(109,158,235,1);">门票预约</a>
        <a href="/index/ticket/dongtai" class="btn" style="background-color: rgba(142,124,195,1);">活动动态</a>
    </div>-->

    <style>
        /* 样式定义 */
        .buttona {
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            /*border: 2px solid red;*/
            padding: 15px;
            margin: 10px;
            background-image: url("{:sysconf('cdn_url')}/ticket/picture/list.png");
            background-repeat: no-repeat;
            background-position: center center;
            background-size: 100%;
            font-size: 16px;
        }

        .buttona a {
            text-decoration: none;
            color: white;
        }

    </style>

    <a href="/index/ticket/zhinan">
        <div class="buttona">
            活动指南
            <div class="arrow"></div>
        </div>
    </a>
    <a href="/index/ticket/video">
        <div class="buttona">
            视频合集
            <div class="arrow"></div>
        </div>
    </a>
    <a href="/index/ticket/menpiao">
        <div class="buttona">
            门票预约
            <div class="arrow"></div>
        </div>
    </a>
    <a href="/index/ticket/dongtai">
        <div class="buttona">
            活动动态
            <div class="arrow"></div>
        </div>
    </a>
    <a href="https://www.xxpie.com/m/album?id=653c8ca6b2190601504fcf09&source=SHARE_LINK&r=1287">
        <div class="buttona">
            活动相册
            <div class="arrow"></div>
        </div>
    </a>


    <div style=";margin-top: 50px;text-align: center">
        <img src="{:sysconf('cdn_url')}/ticket/picture/logo_or55.png?t=20231101" style="width: 199px;height: 176px;">
    </div>


</div>


{include file="ticket/footer"/}
<script type="text/javascript" src="{:sysconf('cdn_url')}/vote/xlj2021/slider/yxMobileSlider.js"></script>
<script type="text/javascript">
    $(".slider").yxMobileSlider({during: 5000, width: 720, height: 400});   //height可以设置首页幻灯片高度
</script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
    wx.config({
        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
        appId: '{$signPackage.appId}', // 必填，公众号的唯一标识
        timestamp: "{$signPackage.timestamp}", // 必填，生成签名的时间戳
        nonceStr: '{$signPackage.nonceStr}', // 必填，生成签名的随机串
        signature: '{$signPackage.signature}',// 必填，签名，见附录1
        jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
    });

    wx.ready(function () {
        wx.error(function (res) {
            console.log(res);
        });
        //朋友圈
        wx.onMenuShareTimeline({
            title: "{:htmlspecialchars($config.title)}", // 分享标题
            link: "{$current_url}", // 分享链接
            imgUrl: "{$config.share_logo}", // 分享图标
            success: function () {
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                // 用户取消分享后执行的回调函数
            }
        });

        //分享给朋友
        wx.onMenuShareAppMessage({
            title: "{:htmlspecialchars($config.title)}", // 分享标题
            desc: "{:htmlspecialchars($config.sub_title)}", // 分享描述
            link: "{$current_url}", // 分享链接
            imgUrl: "{$config.share_logo}", // 分享图标
            type: '', // 分享类型,music、video或link，不填默认为link
            dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
            success: function () {
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                // 用户取消分享后执行的回调函数
            }
        });
    });
</script>

</body>

</html>